<?php
/**
 * Created by PhpStorm.
 * User: dong
 * Date: 2018/4/9
 * Time: 22:08
 */
namespace App\Services\ThirdPayments\BankTraits;

use App\Lib\BankMap;

trait RYFBankMap
{
    private $bankMap = [
        BankMap::GONGSHANG  => '10001',
        BankMap::NONGYE     => '10002',
        BankMap::CHINABANK  => '10004',
        BankMap::JIANSHE    => '10005',
        BankMap::ZHAOSHANG  => '10003',
        BankMap::PUFA       => '10015',
        BankMap::GUANGFA    => '10016',
        BankMap::JIAOTONG   => '10008',
        BankMap::YOUZHEN    => '10012',
        BankMap::ZHONGXIN   => '10007',
        BankMap::MINSHENG   => '10006',
        BankMap::GUANGDA    => '10010',
        BankMap::HUAXIA     => '10025',
        BankMap::XINGYE     => '10009',
        BankMap::SHANGHAI   => '10023',
        BankMap::PINGAN     => '10014',
        BankMap::BEIJING    => '10013'
    ];

    public function getBank($bankCode)
    {
        if (array_key_exists($bankCode, $this->bankMap)) {
            return $this->bankMap[$bankCode];
        } else {
            return '10001';
        }
    }
}